home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Dev / basic / blitzgtfix.lha / BlitzGTFix / BBGTLib_Examples / gtgetinteger.bb2 < prev    next >
Text File  |  2002-01-31  |  746b  |  31 lines

  1. WbToScreen 3
  2. Use Screen 3
  3.  
  4. LoadFont 2,"opal.font",9
  5. Use IntuiFont 2
  6.  
  7. foo.l=GTInteger(0,1,20,20,150,15,"Normal",#PLACETEXT_ABOVE,666)
  8. NPrint Hex$(foo)
  9.  
  10. foo.l=GTNumber(0,2,20,60,150,15,"Default",#PLACETEXT_ABOVE,69)
  11. NPrint Hex$(foo)
  12.  
  13. AddIDCMP #STRINGIDCMP
  14. Window 0,0,0,600,300,$100f,"jjlk",-1,-1
  15. DefaultOutput
  16. AttachGTList 0,0
  17. While ev.l<>#IDCMP_CLOSEWINDOW
  18.     ev.l=WaitEvent
  19.     Select ev
  20.         Case #IDCMP_GADGETDOWN
  21.             NPrint "Integer gadget ",GadgetHit," entered"
  22.         Case #IDCMP_GADGETUP
  23.             NPrint "Integer gadget ",GadgetHit," exited with code ",EventCode
  24.             NPrint "GTInteger contents = ",GTGetInteger(0,1)
  25.             NPrint "GTNumber contents = ",GTGetInteger(0,2)
  26.     End Select
  27. Wend
  28. DetachGTList 0
  29. End
  30.  
  31.